<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%-- <%@ page import="java.text.SimpleDateFormat"%>  --%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>校园推广</title>
<%@ include file="/common/importLib.jsp" %>
<script type="text/javascript" src="../common/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">

	/**
	 * 增删改查参数设置
	 */
	/* toolbarView = 0;
	tableWidth = "100%";
	tableHeight = $(window).height()-110; */
	//toolbarView = 2;
	tableTitle = "校园推广";
	//var addWidth = 550; //添加窗口宽度
	//var addHeight = 350; //添加窗口高度
	//var addTitle = "批量生成销售卡"; //添加标题
	//var updateDisableFlagUri = "../maintain/userBalance/updateDisableFlag.do"; //禁用、起用记录
	//var deleteUri = "/deleteByIds.do"; //删除记录
	tableURL = getTimeURL("../payment/userBalance/querySchoolStudentPaymentBySchoolId.do");
	tableColumns = [[
	                {field:'id',title:'id',width:0},
					{field:'userId',title:'用户id',width:0,hidden:'true'},
					{field:'schoolId',title:'学校id',width:0,hidden:'true'},
					{field:'paymentCode',title:'订单号',width:150,align:'center'},
					{field:'paymentName',title:'订单名目',width:150,align:'center'},
					{field:'money',title:'付费金额',width:70,align:'center'},
					{field:'userName',title:'付费者',width:150,align:'center'},
					{field:'sex',title:'性别',width:70,align:'center'},
					{field:'completeTimeStr',title:'付费时间',width:150,align:'center'},
					{field:'studentSchool',title:'孩子学校',width:150,align:'center'},
					{field:'studentGrade',title:'孩子班级',width:150,align:'center'},
					{field:'studentName',title:'孩子姓名',width:150,align:'center'},
					{field:'studentNum',title:'孩子学号',width:150,align:'center'},
					{field:'schoolName',title:'推广学校',width:150,align:'center'},
					{field:'schoolShareCode',title:'推广码',width:150,align:'center'},
					{field:'secondShareCode',title:'第二推广码',width:150,align:'center'},
					]]; 
	
	$(function(){
		
		$("#exportXls").on('click',exportXls);
	});
	
	/*function searchTable(){
		 var pp = $('#tt').tabs('getSelected');   
		 var tab = pp.panel('options').tab; 
		 createTable(tab.text());
	}*/
	
	
	function exportXls(){
		var studentName = $("#studentName").val();
		var studentGrade = $("#studentGrade").val();
		var userName = $("#userName").val();
		$.messager.confirm('导出', '是否导出校园推广数据？' ,function(r){
			if(r){
				location.href=getTimeURL("../payment/userBalance/exportSchoolUserPaymentBack.do?studentName=" + studentName
						+ "&studentGrade=" + studentGrade + "&userName=" + userName);		
			}
		});
   }

</script>
</head>
<body id="layout" class="easyui-layout">
	<div style="background: none repeat scroll 0% 0% #EFEFEF; height:100px; padding: 6px 2px; border-bottom: 1px solid #CCC;"
		region="north"  split="false" title="条件查询">
	<form  id="searchForm" >
	<table>
		<tr>
			<td width ="30px;"></td>
			<td>付费者：</td>
			<td>
			   <input type="text" name="userName" id="userName"/>
			</td>
			<td width ="30px;"></td>
            <td>孩子姓名：</td>
            <td>
               <input type="text" name="studentName" id="studentName"/>
            </td>
            <td width ="30px;"></td>
            <td>孩子班级：</td>
            <td>
               <input type="text" name="studentGrade" id="studentGrade"/>
            </td>
			<td width ="30px;"></td>
            <td><a class="easyui-linkbutton" id="search" iconCLs="icon-search"  onclick="searchTable();">搜索</a></td>
            <td><a class="easyui-linkbutton" iconCLs="icon-excel" id="exportXls">导出</a></td> 
		</tr>
	</table>
	</form>
	</div>
	<div region="center">
		<!-- datagrid信息表 -->
		<table id="datagrid_table"></table>
	</div>
</body>
</html>